using System;

using FreeFlow.Client;

namespace FreeFlow.WinFormsControls
{
	/// <summary>
	/// Interface that field controls implement to support rendering and filling themselves.
	/// </summary>
  public interface IFillable
  {
    /// <summary>
    /// Renders the control with static layout information using the specified field.
    /// </summary>
    /// <param name="field">Field.</param>
    void Render(Field field);

    /// <summary>
    /// Fills the control with values from the specified field.
    /// </summary>
    /// <param name="field">Field.</param>
    void Fill(Field field);

    /// <summary>
    /// Fills the field from the control.
    /// </summary>
    /// <param name="field">Field.</param>
    void FillField(Field field);
  }

  /// <summary>
  /// Interface that field controls implement to support refills.
  /// </summary>
  public interface IRefillable
  {
    /// <summary>
    /// Event triggered when a refill should occur
    /// </summary>
    event EventHandler Refill;
	}
}
